<?php
defined('YII_INCLUDE_PATH') or define('YII_INCLUDE_PATH', dirname(__FILE__) . '/../../../yii/framework/yii.php');

defined('YII_DEBUG') or define('YII_DEBUG', false); # Remove the following lines
# when in production mode

defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3); # Specify how many levels of call stack
# should be shown in each log message

$cfg = array(
	# application components
	'components' => array(
		'db'	 => array(
			'class'				 => 'CDbConnection',
			'connectionString'	 => 'mysql:host=mysql1.ram.com.ua;dbname=nutri_club',
			'username'			 => 'nutricia',
			'password'			 => 'wwd7YOh1vrvlczV',
			'charset'			 => 'utf8',
			'tablePrefix'		 => '',
			'emulatePrepare'	 => false,
			'enableParamLogging' => YII_DEBUG,
			'enableProfiling'	 => YII_DEBUG,
		),
		'db_ms'	 => array(
			'class'				 => 'ext.components.dbms.DBConnectionMssqlProceduresOnly',
			'connectionString'	 => 'dblib:host=mssql1.ram.com.ua:1433;dbname=nutricia',
			'username'			 => 'u_web_nutricia',
			'password'			 => 'HRaioRANXwuc',
			'charset'			 => 'windows-1251',
			'enableParamLogging' => YII_DEBUG,
			'enableProfiling'	 => YII_DEBUG,
		),
		'cache'	 => array(
//			'class' => 'ext.components.cache.XCache',
//			'class'=>'system.caching.CFileCache',
//			'class'=>'system.caching.CXCache',
			'class' => 'system.caching.CDummyCache',
//			'class'=>'system.caching.CEAcceleratorCache',
//			'class'=>'system.caching.CApcCache',
		),
		'log'	 => array(
			'class'	 => 'CLogRouter',
			'routes' => array(
				array(
					'class'			 => 'CFileLogRoute',
					'levels'		 => 'error, warning',
					'logFile'		 => 'error.log',
					'maxFileSize'	 => 1024,
				),
				array(
					'class'			 => 'CFileLogRoute',
					'levels'		 => 'log, trace',
					'logFile'		 => 'log.log',
					'maxFileSize'	 => 1024,
				),
				array(
					'class'		 => 'application.extensions.components.eLog.EmailLogRoute',
					'levels'	 => 'error',
//					'filter' => array('CLogFilter'),
					'filter'	 => array(
						'class'				 => 'application.extensions.components.eLog.LogFilter',
						'ignoreCategories'	 => array(
							'exception.CHttpException.404', // Ignore 404s
							'exception.CHttpException.403', // Ignore 403s
							'exception.CHttpException.400', // Ignore 400s
						),
					),
					'emails'	 => array('bugs-web@ram.com.ua'),
					'sentFrom'	 => 'bugs-web@' . $_SERVER['HTTP_HOST'],
					'headers'	 => array("MIME-Version: 1.0", "Content-Type: text/plain; charset=utf-8"),
					'subject'	 => 'Bug report from ' . $_SERVER['HTTP_HOST'] . ' ' . date("Y-m-d(H-i-s)"),
				),
			),
		),
	),
	'params'	 => array(
	),
);

return $cfg;
